<?php


require 'db.php';
$name=$_POST['uname'];
$email=$_POST['email'];
$password=$_POST['password'];
$gender=$_POST['gender'];
$dob=$_POST['dob'];
$address=$_POST['address'];
$mobile=$_POST['mobile'];

 	/*	$p_image = $_FILES['image']['name'];
        $p_image = date('ymdHis').'_'.uniqid().'_'.$p_image;
        $fileInfoArray = pathinfo($p_image);
		$src = $_FILES['image']['tmp_name'];
          $dest = "uploads/images/$p_image";
          $isMoved = @move_uploaded_file($src, $dest);

          $_POST['image'] = $p_image;
          if($isMoved == true) {
            ## Creating Thumbnails for Uploaded Image
            ini_set('memory_limit', '-1');
            // include image processing code
            require_once('thumb/image.class.php');

            $img = new Zubrag_image;
            $img->max_x        = 700;
            $img->max_y        = 150;
            $img->GenerateThumbFile($dest, "uploads/thumbs/$p_image");//700/50 */
		  

$sql=("INSERT INTO records(name, email, mobile, password, gender, dob, address)VALUES('$name', '$email', '$mobile', '$password', '$gender', '$dob', '$address')");
mysql_query($sql)or die(mysql_error());
echo "Success Fully Inserted";
// }else{
// echo "File Uploading Problem, Contect Admin";
// } 
?>
<a href="#" id="close">Add New</a>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
	$("#ack").load("load.php");
	$("#close").click( function() {
	$("#form").load("form.php")
	
});
</script>